import React, { Component } from 'react';
import '../../index.css'
class HotList extends Component {
  constructor(){
    super()
    this.state={
      
    }
  }
  render() { 
    return (   <>
      <div className='title'>
    <span>百度热搜</span>
    <span>换一换</span>
  </div>
  <div className='list'>
    <div className='listleft'>
      {this.props.list.map((item,index)=>{
        return<>
          <p key={index}><span style={{color:(item.id===1)?'#f63051':'red'}}>{item.id}</span>&nbsp;&nbsp;<a href="baidu">{item.name}</a></p>
        </>
      })}
    </div>
    <div className='listright'>
    {this.props.list2.map((item,index)=>{
        return<>
          <p key={index}><span style={{color:'#f60'}}>{item.id}</span>&nbsp;&nbsp;<a href="baidu">{item.name}</a></p>
        </>
      })}
    </div>
  </div>
    </>);
  }
}
 
export default HotList;